PROXY_EXE_FULL_PATH=C:\Tools\3proxy\3proxy.exe
PROXY_BAT_FILE=3proxy-run.bat
PROXY_CONF_FILE=3proxy.cfg

;SplitPath, InputVar [, OutFileName, OutDir, OutExtension, OutNameNoExt, OutDrive]
SplitPath, PROXY_EXE_FULL_PATH, PROXY_EXE_FILE, PROXY_PATH
;>>PROXY_EXE_FILE=3proxy.exe
;>>PROXY_PATH=C:\Tools\3proxy
;>>ROOT_DRIVE=C:

;FileCopy, SourcePattern, DestPattern [, Flag]
FileCopy, %A_ScriptDir%/%PROXY_BAT_FILE%, %PROXY_PATH%, 1
FileCopy, %A_ScriptDir%/%PROXY_CONF_FILE%, %PROXY_PATH%, 1

if (ErrorLevel <> 0)
{
    MsgBox %ErrorLevel% could not be copied.
    return
}

;Run, Target [, WorkingDir, Max|Min|Hide|UseErrorLevel, OutputVarPID]
;Run, "%PROXY_PATH%/3proxy.exe" "%PROXY_PATH%\3proxy.cfg", %PROXY_PATH%
Run, "%PROXY_PATH%/%PROXY_BAT_FILE%", %PROXY_PATH%
